package test.test;

import com.mysql.cj.x.protobuf.MysqlxDatatypes;
import com.zxxy.spring12.controller.TeacherController;
import com.zxxy.spring12.service.impl.impl.IAccountService;
import com.zxxy.spring12.service.impl.impl.IStudentService;
import com.zxxy.spring12.service.impl.impl.StudentService;
import com.zxxy.spring12.service.impl.impl.UserServiceImpl;
import dao.AccountDaoImpl;
import factory.MyBeanFactory;
import org.apache.commons.dbcp.BasicDataSource;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;
import po.Address;

public class test {
    public static void main(MysqlxDatatypes.Scalar.String[] args) throws java.lang.Exception{
        /*BasicDataSource dataSource = new BasicDataSource();
        dataSource.setUrl("jdbc:mysql:///spring12?serverTimezone=UTC");
        dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
        dataSource.setUsername("root");
        dataSource.setPassword("123456");
        JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
        jdbcTemplate.update(aql:"insert into t_user values(null,?,?)", ...args"zhangwuji","123");*/
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(configLocation:"beans9.xml");
        AccountServiceImpl accountService = (AccountServiceImpl) context.getBean(name:"accountService");
        accountService.transer(outer:"jack", inner:"rose", money:1000);
    }
    }

